package com.my.pojo;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.List;

/**
* @Author: jiChen
* @Description: 商户实体类
* @Date: 2021/11/29 8:21 上午
*/

@Entity
@Getter
@Setter
@ToString
@RequiredArgsConstructor
@Table(name = "business")
public class Business {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "business_id")
    private Integer businessId;

    @Column(name = "username")
    private String username;

    @Column(name = "password")
    private String password;

    @Column(name = "shop_name")
    private String shopName;

    @Column(name = "face")
    private String face;

    @Column(name = "phone")
    private String phone;

    @Column(name = "email")
    private String email;

    @Column(name = "status")
    private Integer status;

    @OneToMany(mappedBy = "business")
    private List<Goods> goodsList;

    @OneToMany(mappedBy = "business")
    private List<Orders> ordersList;

}
